std.data
Pebble 0.3.1 · all symbols on this page are stable.
Helpers for converting between data and the Pebble-level string type. For converting other types to and from data, use the built-in ToData interface (.toData() method) and the destructors in std.builtins.
Methods
| Function | Description |
|---|---|
strToData(s: string): data | Encode a UTF-8 string as data (via encodeUtf8 and then bData). |
strFromData(d: data): string | Decode data containing UTF-8 bytes back to a string. Fails on bad input. |
See also
data— the type itselfstd.builtins—constrData,mapData,listData,iData,bDataand their destructorsToData— the auto-implemented interface every encodable type satisfies